package api

import (
	"cgs-server/helper"
	"cgs-server/server"
	"net/http"
)

type VersionHandler struct {

}

func NewVersionHandler() *VersionHandler {
	return &VersionHandler{}
}

func (v *VersionHandler) GetVersion(w http.ResponseWriter, r *http.Request) {
	_, _ = helper.WriteJSON(w, server.OK("Get successfully!").WithData(server.Config.Version))
}

